package cn.smvc.task.web;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.fastjson.JSON;

import cn.smvc.common.web.BaseServlet;
import cn.smvc.task.service.TTimedTaskLogService;

@WebServlet("/timedtasklog")
public class TimedTaskLogServlet extends BaseServlet{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8634988552577151860L;
	
	@Autowired
	private TTimedTaskLogService tTimedTaskLogService;
	
	
	public void queryPage(HttpServletRequest request, HttpServletResponse response) 
			throws ServletException, IOException {
		response.setCharacterEncoding("UTF-8");
		response.setContentType("application/json; charset=utf-8");
		PrintWriter out = response.getWriter();
		
		Map<String, String[]> param = request.getParameterMap();
		Map<String, Object> result = tTimedTaskLogService.queryPage(param);
		
		out.println(JSON.toJSONString(result));
	}
	
}